The present invention relates to a correlator for calculating the correlation value of two signals. More particularly, the invention pertains to a correlator which performs arithmetic operations to obtain a correlation value in an analog signal processing mode.
The following equation is well known for calculating the correlation value of two signals: ##EQU1## where B(k) and R(k+l-1) are the two signal trains upon which the calculation is carried out.
The difference of the two signals is obtained for each value of the variable k, and the sum of the absolute values of the differences is determined to calculate the correlation H(l) of the two signals. The variable l indicates the relative movement (deviation) between the two signals. For each value of the variable l, the operation is repeated for k=1 to n, whereby correlation value patterns H(1), H(2), . . . , H(l) are obtained. The phase difference between the two signals can be detected from changes in the correlation value patterns H(1), H(2), . . . , H(l).
Such a method has been extensively employed in the field of signal processing. An example of an application of such signal processing is in detecting the point of correct focus for a camera. A conventional correlator applied to a phase difference detecting device as shown in FIG. 6 will now be described.
As shown in FIG. 6, a film plane 2 is located behind the photographing lens 2 of a camera, and a condenser lens 3, separator lens 4, and a phase difference detecting device are arranged behind the film plane 2 in the stated order. The phase difference detecting device may be implemented with line sensors 5 and 6, such as CCDs (Charged-Coupled Devices) for photoelectrically converting a pair of images of the object formed by the separator lens 4. The phase difference detecting device further includes a correlator for determining from the electrical signals produced by the line sensors 5 and 6, which are related to the distribution of luminous intensity, whether or not the photographing lens is properly focused on the object.
In a "front focus" condition in which the image is positioned in front of the film plane, the images on the line sensors 5 and 6 are near the optical axis, in a "rear focus" condition in which the image is located behind the film plane the images on the line sensors 5 and 6 move away from the optical axis, and in the properly focused condition the images on the line sensors 5 and 6 are located between their respective positions for the "front focus" and "rear focus" conditions, that is, at the focusing position. Therefore, the focusing condition at any time can be determined by detecting the positions of the images with respect to the optical axis 8 from the electrical signals produced by the line sensors 5 and 6.
A correlation operation based upon equation (1) above has been employed for the automatic detection of the positions of the images on the lines sensors 5 and 6. That is, the correlation value of one pair of images formed on the line sensors 5 and 6 are calculated from equation (1), and when the correlation value is a maximum (or minimum), the amount of relative movement l is detected to thereby determine the positional deviation (focusing condition) of the two signals B(k) and R(k+l-1).
In equation (1), B(k) corresponds to the electrical signals produced by the picture elements of the line sensor 5, R(k+l-1) corresponds to the electrical signals provided by the picture elements of the line sensor 6, and k indicates the arrangement of the picture elements. As the variable l is changed within a range of unity to a given value, equation (1) is evaluated with respect to the signals B(k) and R(k+l-1). As a result, a correlation value pattern H(1), H(2), . . . H(l), as indicated in FIG. 8, is obtained.
It is determined in advance that, for example, the photographing lens is properly focused on the object when the correlation value H(4) is a maximum. Therefore, when a correlation value other than H(4) is a maximum, it is determined that the photographing lens is defocused, with the amount of defocusing being indicated by the phase difference from the case of l=4.
The arrangement of a conventional correlator operating as described above is shown in FIG. 7. Analog electrical signals produced by the picture elements of the line sensors 5 and 6 are converted by an A/D (analog-to-digital) converter 9 into, for instance, eight-bit digital data, which is stored in a RAM (random access memory) 11 under the control of a microcomputer (CPU - central processing unit) 10. That is, evaluation of equation (1) is carried out employing digital data stored in the RAM.
In this conventional correlator, however, because the correlation values are calculated in a digital mode, the conventional correlator is disadvantageous in that it requires the provision of an expensive A/D converter in order to be able to carry out the required calculations at high speed with the required accuracy. Furthermore, the conventional correlator is disadvantageous in that rounding errors occur due to limitations, for example, in the number of bits handled by the microprocessor, thus lowering the accuracy of the calculation. Moreover, the computer requires a complex and expensive program to perform the required operations.